package com.cq.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author C-Q
 * @version 1.1.0
 * @Description: TODO
 * @date 2022/11/20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    //数据库id自动生成
    //@TableId(type = IdType.AUTO)

    //手动输入id
    @TableId(type = IdType.INPUT)
    private Long id;
    //属性和列名对应的关系
//    @TableField(value = "uname")
    private String name;
    private Integer age;
    private String email;

    //@TableField(exist = false)表示该属性不在数据库中
    //private Integer status;


    public User(String name, Integer age, String email) {
        this.name = name;
        this.age = age;
        this.email = email;
    }
}
